FROM node:10.14.1 as builder
WORKDIR /app
ADD package.json /app
RUN npm install
ARG URL
ENV URL ${URL}
RUN npm run build -- ${URL}

FROM openresty/openresty:1.15.8.1-2-bionic
COPY --from=builder /app/dist /usr/local/openresty/nginx/html
